package cn.wolfcode.rbac.mapper;

import cn.wolfcode.rbac.domain.Department;
import cn.wolfcode.rbac.domain.Employee;
import cn.wolfcode.rbac.query.QueryObject;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface EmployeeMapper {
    int deleteByPrimaryKey(Long id);

    int insert(Employee record);

    Employee selectByPrimaryKey(Long id);

    List<Employee> selectAll();

    int updateByPrimaryKey(Employee record);

    Integer selectForCount(QueryObject queryObject);

    List<Employee> selectForList(QueryObject queryObject);

    void deleteEmpAndRoleRelation(Long id);

    void insertRoleAndEmpRelation(@Param("roleId") Long roleId, @Param("employeeId") Long employeeId);

    Employee login(@Param("username") String username, @Param("password") String password);
}